﻿Public Class CustomersForm

    Private Sub CustomersForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If NorthwindDataSetUtil.DesignerUtil.IsRunTime Then
            'TODO: Delete this line of code to remove the default AutoFill for 'NorthwindDataSet.Customers'.
            Me.CustomersTableAdapter.Fill(Me.NorthwindDataSet.Customers)
            Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Orders)
            Me.EmployeesTableAdapter1.Fill(Me.NorthwindDataSet.Employees)
        End If

    End Sub

    Private Sub NewMenuItemMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewMenuItemMenuItem.Click
        CustomersBindingSource.AddNew()
        Dim customersEditViewDialog As SmartDeviceProject1.CustomersEditViewDialog = SmartDeviceProject1.CustomersEditViewDialog.Instance(Me.CustomersBindingSource)
        customersEditViewDialog.ShowDialog()

    End Sub

    Private Sub CustomersDataGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomersDataGrid.Click
        Dim customersSummaryViewDialog As SmartDeviceProject1.CustomersSummaryViewDialog = SmartDeviceProject1.CustomersSummaryViewDialog.Instance(Me.CustomersBindingSource)
        customersSummaryViewDialog.ShowDialog()

    End Sub
End Class